#pragma once

#include "Markup.h"

struct xmlData
{
	CString szName;
	CString szValue;
};

class CXml
{
public:
	CXml();
	~CXml();
	
	int GetDataNum(LPCTSTR file);
	
	bool LoadXML(LPCTSTR file, int num , xmlData date[]);
	bool LoadXML(LPCTSTR file, int num , int time, xmlData date[]);
	
	bool SetXML(LPCTSTR file, int num , xmlData date[]);
	bool SetXML(LPCTSTR file, int num , int time, xmlData date[]);

	void SaveXML(LPCTSTR file);
	void SaveXML(LPCTSTR file, int num , xmlData date[]);
	void SaveXML(LPCTSTR file, int num , int time, xmlData date[]);

	bool DeleteXML(LPCTSTR file, xmlData data);
	bool FindXML(LPCTSTR file, xmlData data);

	bool FindFile(LPCTSTR file);
	int  FindFiles(LPCTSTR filePath, int flag, CString data[]);
	void RemoveXML(LPCTSTR file);
};
